Mersenne Prime

Definition

A Mersenne prime is a prime number of the form

\[ 2^n - 1\]

where \(n\) is a positive integer.


Theorem

If \(a^n - 1\) is prime for some positive integers \(a, n\), then \(a = 2\) and \(n\) is prime.

This provides a necessary condition for the value of \(n\) in all Mersenne primes.

Proof

If \(a \geq 3\) then we have the following non-trivial factorisation:

\[ a^n - 1 = (a - 1)(a^{n - 1} + a^{n - 2} + \dots + a + 1).\]

This factorisation is non-trivial since \(a \geq 3 \implies a - 1 \geq 2\) and since \(n\) is a positive integer, \(a^{n - 1} + \dots + 1\) is at least \(1 + 1 = 2\).

Then, we will take \(a = 2\) and show the contrapositive, that \(n\) being composite implies that \(2^n - 1\) is composite. Noting that \(n = 1\) gives \(2^n - 1\) which is not prime.

Let \(n = sr\) where \(s, r \geq 2\), then we have the factorisation:

\[ 2^{sr} - 1 = (2^r)^s - 1 = (2^r - 1)((2^r)^{s - 1} + (2^r)^{s - 2} + \dots + 2^r + 1)\]

where since \(r \geq 2\), neither term is trivial.